/*
*@func 两数之和
*@params { x @types number, y @types number}
*@return number
 */
var twoSum = function(a, b){
    //参数的数量
    //if ()
    // this
    if(arguments.length < 2){
        throw new Error("您传入的参数数量有误");
        return ;
    }

    //isNnN "1"

    if(isNaN(a) || isNaN(b)) {
        throw new Error("传入的参数类型有误");
        return ;
    }
    return a + b
}


console.log(twoSum(1, parseInt(document.getElementById("numInput").value)))